package com.example.springbook.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class TestController {
    @RequestMapping("/t1")
    public String t1() {
        int result = 10/0;
        return "string";
    }

    @RequestMapping("/t2")
    public Integer t2() {
        String s = null;
        System.out.println(s.length());
        return 1;
    }

    @RequestMapping("/t3")
    public Boolean t3() {
        Integer[] arr = new Integer[]{1,2};
        System.out.println(arr[3]);
        return true;
    }
}
